import request from '@/config/axios'

//更新党员学习材料
export const updateStudymaterials = async (data) => {
  return await request.put({ url: '/countryside/study-materials/update', data })
}
//创建党员学习材料
export const createStudymaterials = async (data) => {
  return await request.post({ url: '/countryside/study-materials/create', data })
}
//统计学习详情
export const countStudymaterials = async (params) => {
  return await request.get({ url: '/countryside/study-materials/statistical', params })
}
//获得党员学习材料分页
export const getStudymaterialsPage = async (params) => {
  return await request.get({ url: '/countryside/study-materials/page', params })
}
//获得党员学习材料
export const getStudymaterials = async (params) => {
  return await request.get({ url: '/countryside/study-materials/get', params })
}
//导出党员学习材料 Excel
// export const exportStudymaterials = async (params) => {
//   return await request.download({ url: '/countryside/study-materials/export-excel', params })
// }
export const exportStudymaterials = async () => {
  return await request.download({ url: '/countryside/study-materials/export-excel' })
}
//删除党员学习材料
export const deleteStudymaterials = async (id) => {
  return await request.delete({ url: '/countryside/study-materials/delete?id=' + id })
}
//批量删除党员学习材料
export const deleteStudymaterialsList = async (id) => {
  return await request.delete({ url: '/countryside/study-materials/deletes?ids=' + id })
}


//更新党员学习材料类型
export const updateType = async (data) => {
  return await request.put({ url: '/countryside/material-type/update', data })
}
//创建党员学习材料类型
export const createType = async (data) => {
  return await request.post({ url: '/countryside/material-type/create', data })
}
//获得党员学习材料类型分页
export const getTypePage = async (params) => {
  return await request.get({ url: '/countryside/material-type/page', params })
}
//获得党员学习材料类型
export const getType = async (params) => {
  return await request.get({ url: '/countryside/material-type/get', params })
}
//导出党员学习材料类型 Excel
export const exportType = async (params) => {
  return await request.download({ url: '/countryside/material-type/export-excel', params })
}
//删除党员学习材料类型
export const deleteType = async (id) => {
  return await request.delete({ url: '/countryside/material-type/delete?id=' + id })
}



//更新党员学习记录
export const updateStudyrecords = async (data) => {
  return await request.put({ url: '/countryside/learning-records/update', data })
}
//创建党员学习记录
export const createStudyrecords = async (data) => {
  return await request.post({ url: '/countryside/learning-records/create', data })
}
//获得党员学习记录分页
export const getStudyrecordsPage = async (params) => {
  return await request.get({ url: '/countryside/learning-records/page', params })
}
//获得党员学习记录
export const getStudyrecords = async (params) => {
  return await request.get({ url: '/countryside/learning-records/get', params })
}
//导出党员学习记录 Excel
export const exportStudyrecords = async (params) => {
  return await request.download({ url: '/countryside/learning-records/export-excel', params })
}
//删除党员学习记录
export const deleteStudyrecords = async (id) => {
  return await request.delete({ url: '/countryside/learning-records/delete?id=' + id })
}



//更新党员学习问题
export const updateQuestions = async (data) => {
  return await request.put({ url: '/countryside/learning-questions/update', data })
}
//创建党员学习问题
export const createQuestions = async (data) => {
  return await request.post({ url: '/countryside/learning-questions/create', data })
}
//获得党员学习问题分页
export const getQuestionsPage = async (params) => {
  return await request.get({ url: '/countryside/learning-questions/page', params })
}
//获得党员学习问题
export const getQuestions = async (params) => {
  return await request.get({ url: '/countryside/learning-questions/get', params })
}
//导出党员学习问题 Excel
export const exportQuestions = async (params) => {
  return await request.download({ url: '/countryside/learning-questions/export-excel', params })
}
//删除党员学习问题
export const deleteQuestions = async (id) => {
  return await request.delete({ url: '/countryside/learning-questions/delete?id=' + id })
}
//批量删除党员学习问题
export const deleteQuestionsList = async (id) => {
  return await request.delete({ url: '/countryside/learning-questions/deletes?ids=' + id })
}


// 获取党员全列表
export const getStudyList = async (params) => {
  return await request.get({ url: '/countryside/party-member/list-all-simple',params })
}
// 获取党组织全列表
export const getOrganizationPage = async (data) => {
  return await request.post({ url: '/countryside/party-organization/list', data })
}
// 获得所有党员
export const getAllStudy = async () => {
  return await request.get({ url: '/countryside/party-member/get-partyMember-list' })
}